const cmd = require('commander')
const chalk = require('chalk')
const ora = require('ora')
const options = require('../quirer')

cmd
  .command('init')
  .description('初始化模板')
  .action(async (args) => {
    console.log(chalk.yellow('Sky Cli Template Frame Start... \n'))
    const v = await options()
    console.log(args, v)
    const spinner = ora('正在拉取模板! ').start()
    setTimeout(() => {
      spinner.stop()
      console.log(chalk.green.bold('项目创建成功!'))
    }, 1000)
  })
